package io.renren.modules.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.renren.modules.demo.entity.TestUser;
import io.renren.modules.demo.service.ITestUserService;

@RestController
@RequestMapping("/t")
public class TestUserController  {
    
    @Autowired
    private ITestUserService userService;
    
    @RequestMapping("/str")
    public String str() {
        return "hello Aron.";
    }
    
    @RequestMapping("/db")
    public TestUser db() {
        TestUser entity = userService.selectById(1L);
        return entity;
    }
}
